]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Revert !1999
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 4 Nov 2021 13:07:34 +0000 (14:07 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 4 Nov 2021 13:08:05 +0000 (14:08 +0100)
The changes introduce crashes, so back out until we
figure those out.

This reverts commits ceee53aa0a4 and 5d5bfe492cd81.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2022>

js/ui/unlockDialog.js

index 3ef6aa90f053d75d6db50e30c6f8bb58079e8ae6..370385abc47bb9216efade9c71312e44c8891e10 100644 (file)
@@ -676,14 +676,16 @@ var UnlockDialog = GObject.registerClass({
     }
 
     _ensureAuthPrompt() {
-        if (!this._authPrompt) {
-            this._authPrompt = new AuthPrompt.AuthPrompt(this._gdmClient,
-                AuthPrompt.AuthPromptMode.UNLOCK_ONLY);
-            this._authPrompt.connect('failed', this._fail.bind(this));
-            this._authPrompt.connect('cancelled', this._fail.bind(this));
-            this._authPrompt.connect('reset', this._onReset.bind(this));
-            this._promptBox.add_child(this._authPrompt);
-        }
+        if (this._authPrompt)
+            return;
+
+        this._authPrompt = new AuthPrompt.AuthPrompt(this._gdmClient,
+            AuthPrompt.AuthPromptMode.UNLOCK_ONLY);
+        this._authPrompt.connect('failed', this._fail.bind(this));
+        this._authPrompt.connect('cancelled', this._fail.bind(this));
+        this._authPrompt.connect('reset', this._onReset.bind(this));
+
+        this._promptBox.add_child(this._authPrompt);
 
         this._authPrompt.reset();
         this._authPrompt.updateSensitivity(true);
@@ -870,11 +872,7 @@ var UnlockDialog = GObject.registerClass({
     }
 
     finish(onComplete) {
-        if (!this._authPrompt) {
-            onComplete();
-            return;
-        }
-
+        this._ensureAuthPrompt();
         this._authPrompt.finish(onComplete);
     }